package com.example.websocketdemo.service.SHISHI;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.websocketdemo.config.WebSocketTest;

import java.io.IOException;

public class SHISHIInterlockingSignalService {

    //静态
    private static String D_HY1011;
    private static String D_HY1012;
    private static String D_HY1013;
    private static String D_LS1152;
    private static String D_XZSC_T101A;
    private static String D_XZSO_T101A;
    private static String D_XZSC_T101B;
    private static String D_XZSO_T101B;

    private static String D_HY1021;
    private static String D_HY1022;
    private static String D_HY1023;
    private static String D_LS1142;
    private static String D_XZSC_T102A;
    private static String D_XZSO_T102A;
    private static String D_XZSC_T102B;
    private static String D_XZSO_T102B;
    private static String D_HY1031;
    private static String D_HY1032;
    private static String D_HY1033;
    private static String D_LS1132;
    private static String D_XZSC_T103A;
    private static String D_XZSO_T103A;
    private static String D_XZSC_T103B;
    private static String D_XZSO_T103B;
    private static String D_HY1041;
    private static String D_HY1042;
    private static String D_HY1043;
    private static String D_LS1122;
    private static String D_XZSC_T104A;
    private static String D_XZSO_T104A;
    private static String D_XZSC_T104B;
    private static String D_XZSO_T104B;
    private static String D_HY1051;
    private static String D_HY1052;
    private static String D_HY1053;
    private static String D_LS1112;
    private static String D_XZSC_T105A;
    private static String D_XZSO_T105A;
    private static String D_XZSC_T105B;
    private static String D_XZSO_T105B;
    private static String D_HY1061;
    private static String D_HY1062;
    private static String D_HY1063;
    private static String D_LS1102;
    private static String D_XZSC_T106A;
    private static String D_XZSO_T106A;
    private static String D_XZSC_T106B;
    private static String D_XZSO_T106B;

    private static String D_HV1071;
    private static String D_HV1072;
    private static String D_HV1073;
    private static String D_LS1092;
    private static String D_HV1081;
    private static String D_HV1082;
    private static String D_HV1083;
    private static String D_LS1082;
    private static String D_HV1091;
    private static String D_HV1092;
    private static String D_HV1093;
    private static String D_LS1072;
    private static String D_HV1101;
    private static String D_HV1102;
    private static String D_HV1103;
    private static String D_LS1062;

    private static String D_HY1111;
    private static String D_HY1112;
    private static String D_HY1113;
    private static String D_LS1052;
    private static String D_XZSC_T111A;
    private static String D_XZSO_T111A;
    private static String D_XZSC_T111B;
    private static String D_XZSO_T111B;
    private static String D_HY1121;
    private static String D_HY1122;
    private static String D_HY1123;
    private static String D_LS1042;
    private static String D_XZSC_T112A;
    private static String D_XZSO_T112A;
    private static String D_XZSC_T112B;
    private static String D_XZSO_T112B;
    private static String D_HY1131;
    private static String D_HY1132;
    private static String D_HY1133;
    private static String D_LS1032;
    private static String D_XZSC_T113A;
    private static String D_XZSO_T113A;
    private static String D_XZSC_T113B;
    private static String D_XZSO_T113B;
    private static String D_HY1141;
    private static String D_HY1142;
    private static String D_HY1143;
    private static String D_LS1022;
    private static String D_XZSC_T114A;
    private static String D_XZSO_T114A;
    private static String D_XZSC_T114B;
    private static String D_XZSO_T114B;
    private static String D_HY1151;
    private static String D_HY1152;
    private static String D_HY1153;
    private static String D_LS1012;
    private static String D_XZSC_T115A;
    private static String D_XZSO_T115A;
    private static String D_XZSC_T115B;
    private static String D_XZSO_T115B;

    public String change(Double AV) {
        String canshu = "";
        if (AV == 0) {
            canshu = "开";
        } else if (AV == 1) {
            canshu = "关";
        }
        return canshu;
    }

    //判断
    public void transferParameters(String bitNumber, Double AV) throws IOException {
        SHISHIInterlockingSignalService shishiInterlockingSignalService = new SHISHIInterlockingSignalService();
        JSONObject jsonObject = new JSONObject();
        if (bitNumber.contains("D_HY1011")) {
            D_HY1011 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1011");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1012")) {
            D_HY1012 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1012");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1013")) {
            D_HY1013 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1013");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1142")) {
            D_LS1142 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1142");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T101A")) {
            D_XZSC_T101A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T101A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T101A")) {
            D_XZSO_T101A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T101A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T101B")) {
            D_XZSC_T101B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T101B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T101B")) {
            D_XZSO_T101B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T101B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        }else if (bitNumber.contains("D_HY1021")) {
            D_HY1021 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1021");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1022")) {
            D_HY1022 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1022");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1023")) {
            D_HY1023 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1023");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1142")) {
            D_LS1142 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1142");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T102A")) {
            D_XZSC_T102A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T102A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T102A")) {
            D_XZSO_T102A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T102A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T102B")) {
            D_XZSC_T102B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T102B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T102B")) {
            D_XZSO_T102B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T102B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1031")) {
            D_HY1031 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1031");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1032")) {
            D_HY1032 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1032");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1033")) {
            D_HY1033 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1033");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1132")) {
            D_LS1132 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1132");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T103A")) {
            D_XZSC_T103A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T103A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T103A")) {
            D_XZSO_T103A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T103A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T103B")) {
            D_XZSC_T103B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T103B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T103B")) {
            D_XZSO_T103B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T103B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1041")) {
            D_HY1041 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1041");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1042")) {
            D_HY1042 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1042");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1043")) {
            D_HY1043 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1043");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1122")) {
            D_LS1122 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1122");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T104A")) {
            D_XZSC_T104A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T104A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T104A")) {
            D_XZSO_T104A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T104A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T104B")) {
            D_XZSC_T104B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T104B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T104B")) {
            D_XZSO_T104B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T104B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1051")) {
            D_HY1051 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1051");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1052")) {
            D_HY1052 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1052");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1053")) {
            D_HY1053 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1053");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1112")) {
            D_LS1112 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1112");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T105A")) {
            D_XZSC_T105A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T105A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T105A")) {
            D_XZSO_T105A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T105A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T105B")) {
            D_XZSC_T105B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T105B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T105B")) {
            D_XZSO_T105B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T105B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1061")) {
            D_HY1061 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1061");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1062")) {
            D_HY1062 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1062");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1063")) {
            D_HY1063 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1063");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1102")) {
            D_LS1102 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1102");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T106A")) {
            D_XZSC_T106A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T106A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T106A")) {
            D_XZSO_T106A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T106A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T106B")) {
            D_XZSC_T106B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T106B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T106B")) {
            D_XZSO_T106B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T106B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1071")) {
            D_HV1071 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1071");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1072")) {
            D_HV1072 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1072");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1073")) {
            D_HV1073 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1073");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1092")) {
            D_LS1092 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1092");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1081")) {
            D_HV1081 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1081");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1082")) {
            D_HV1082 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1082");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1083")) {
            D_HV1083 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1083");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1082")) {
            D_LS1082 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1082");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1091")) {
            D_HV1091 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1091");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1092")) {
            D_HV1092 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1092");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1093")) {
            D_HV1093 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1093");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1072")) {
            D_LS1072 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1072");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1101")) {
            D_HV1101 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1101");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1102")) {
            D_HV1102 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1102");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HV1103")) {
            D_HV1103 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HV1103");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1062")) {
            D_LS1062 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1062");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1111")) {
            D_HY1111 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1111");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1112")) {
            D_HY1112 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1112");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1113")) {
            D_HY1113 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1113");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1052")) {
            D_LS1052 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1052");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T111A")) {
            D_XZSC_T111A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T111A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T111A")) {
            D_XZSO_T111A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T111A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T111B")) {
            D_XZSC_T111B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T111B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T111B")) {
            D_XZSO_T111B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T111B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1121")) {
            D_HY1121 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1121");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1122")) {
            D_HY1122 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1122");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1123")) {
            D_HY1123 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1123");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1042")) {
            D_LS1042 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1042");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T112A")) {
            D_XZSC_T112A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T112A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T112A")) {
            D_XZSO_T112A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T112A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T112B")) {
            D_XZSC_T112B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T112B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T112B")) {
            D_XZSO_T112B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T112B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1131")) {
            D_HY1131 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1131");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1132")) {
            D_HY1132 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1132");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1133")) {
            D_HY1133 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1133");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1032")) {
            D_LS1032 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1032");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T113A")) {
            D_XZSC_T113A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T113A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T113A")) {
            D_XZSO_T113A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T113A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T113B")) {
            D_XZSC_T113B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T113B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T113B")) {
            D_XZSO_T113B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T113B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1141")) {
            D_HY1141 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1141");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1142")) {
            D_HY1142 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1142");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1143")) {
            D_HY1143 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1143");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1032")) {
            D_LS1022 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1032");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T114A")) {
            D_XZSC_T114A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T114A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T114A")) {
            D_XZSO_T114A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T114A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T114B")) {
            D_XZSC_T114B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T114B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T114B")) {
            D_XZSO_T114B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T114B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1151")) {
            D_HY1151 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1151");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1152")) {
            D_HY1152 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1152");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_HY1153")) {
            D_HY1153 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_HY1153");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_LS1032")) {
            D_LS1012 = change(AV);
            jsonObject.put("连锁信号区域名称", "D_LS1032");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T115A")) {
            D_XZSC_T115A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T115A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T115A")) {
            D_XZSO_T115A = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T115A");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSC_T115B")) {
            D_XZSC_T115B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSC_T115B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        } else if (bitNumber.contains("D_XZSO_T115B")) {
            D_XZSO_T115B = change(AV);
            jsonObject.put("连锁信号区域名称", "D_XZSO_T115B");
            shishiInterlockingSignalService.t(jsonObject.toJSONString());
        }
    }


    public void t(String bitNumber) throws IOException {
        JSONObject jsonObject = new JSONObject();
//        JSONObject json = new JSONObject();
        JSONObject xinxi = new JSONObject();
//        JSONObject xinxi1 = new JSONObject();
//        JSONObject xinxi2 = new JSONObject();
//        JSONObject xinxi3 = new JSONObject();

        JSONArray Array = new JSONArray();
        jsonObject.put("instruction", "liansuoxinhao");
//        json.put("updatetype","reset");
//        json.put("poigroup","interlocking");
//        json.put("poitype","message");
//        if (bitNumber.equals("一号库汽油罐区")){
//            xinxi1.put("所属区域名称","一号库汽油罐区");
//            xinxi1.put("设备名称","HV1112进口阀状态");
//            xinxi1.put("指标名称","HV1111出口阀状态");
//            xinxi1.put("实时●状态","关");
//            xinxi1.put("实时●数值","4.97");
//            xinxi1.put("位号","SCADA_D_HY2022");
//            xinxi1.put("issue","true");
//            Array.add(xinxi1);
//        }else if (bitNumber.equals("引桥")){
//            xinxi2.put("所属区域名称","引桥");
//            xinxi2.put("设备名称","HV-0161紧急切断阀");
//            xinxi2.put("指标名称","HV0161紧急切断阀状态");
//            xinxi2.put("实时●状态","关");
//            xinxi2.put("实时●数值","4.80");
//            xinxi2.put("位号","SCADA_DI_HV0161");
//            xinxi2.put("issue","false");
//            Array.add(xinxi2);
//        }else if (bitNumber.equals("二号库区柴油罐区2")){
//            xinxi3.put("所属区域名称","二号库区柴油罐区2");
//            xinxi3.put("设备名称","T207柴油罐");
//            xinxi3.put("指标名称","HV2073倒罐阀状态");
//            xinxi3.put("实时●状态","关");
//            xinxi3.put("实时●数值","2.04");
//            xinxi3.put("位号","SCADA_D_HY2073");
//            xinxi3.put("issue","false");
//            Array.add(xinxi3);
//        }
        if (bitNumber.contains("T101")) {
            xinxi.put("id", "T101");
//            if (bitNumber.contains("D_HY1011")) {
//                xinxi.put("出口阀状态", "HV1011出口阀状态_" + change(AV));
//            } else if (bitNumber.contains("D_HY1012")) {
//                xinxi.put("进口阀状态", "HV1012进口阀状态_" + change(AV));//SCADA_D_HY1012
//            } else if (bitNumber.contains("D_HY1013")) {
//                xinxi.put("倒罐阀状态", "HV1013倒罐阀状态_" + change(AV));//SCADA_D_HY1013
//            } else if (bitNumber.contains("D_LS1152")) {
//                xinxi.put("音叉液位状态", "LS1152音叉液位状态_" + change(AV));//SCADA_D_LS1152
//            } else if (bitNumber.contains("D_XZSC_T101A")) {
//                xinxi.put("进料阀关状态", "XVT101A进料阀关状态_" + change(AV));
//            } else if (bitNumber.contains("D_XZSO_T101A")) {
//                xinxi.put("进料阀开状态", "XVT101A进料阀开状态_" + change(AV));
//            } else if (bitNumber.contains("D_XZSC_T101B")) {
//                xinxi.put("出料阀关状态", "XVT101B进料阀关状态_" + change(AV));
//            } else if (bitNumber.contains("D_XZSO_T101B")) {
//
//            }









            //SCADA_D_HY1011

           //SIS_D_XZSC_T101A
           //SIS_D_XZSO_T101A
            //

            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T102")) {
            xinxi.put("id", "T102");
            xinxi.put("出口阀状态", "HV1021出口阀状态_" + D_HY1021);
            xinxi.put("进口阀状态", "HV1022进口阀状态_" + D_HY1022);
            xinxi.put("倒罐阀状态", "HV1023倒罐阀状态_" + D_HY1023);
            xinxi.put("音叉液位状态", "LS1142音叉液位状态_" + D_LS1152);
            xinxi.put("进料阀关状态", "XVT102A进料阀关状态_" + D_XZSC_T102A);
            xinxi.put("进料阀开状态", "XVT102A进料阀开状态_" + D_XZSO_T102A);//SIS_D_XZSO_T102A
            xinxi.put("出料阀关状态", "XVT102B进料阀关状态_" + D_XZSC_T102B);
            xinxi.put("出料阀开状态", "XVT102B进料阀开状态_" + D_XZSO_T102B);
            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T103")) {
            xinxi.put("id", "T103");
            xinxi.put("出口阀状态", "HV1031出口阀状态_" + D_HY1031);
            xinxi.put("进口阀状态", "HV1032进口阀状态_" + D_HY1032);
            xinxi.put("倒罐阀状态", "HV1033倒罐阀状态_" + D_HY1033);
            xinxi.put("音叉液位状态", "LS1132音叉液位状态_" + D_LS1132);
            xinxi.put("进料阀关状态", "XVT103A进料阀关状态_" + D_XZSC_T103A);
            xinxi.put("进料阀开状态", "XVT103A进料阀开状态_" + D_XZSO_T103A);
            xinxi.put("出料阀关状态", "XVT103B进料阀关状态_" + D_XZSC_T103B);
            xinxi.put("出料阀开状态", "XVT103B进料阀开状态_" + D_XZSO_T103B);
            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T104")) {
            xinxi.put("id", "T104");
            xinxi.put("出口阀状态", "HV1041出口阀状态_" + D_HY1041);
            xinxi.put("进口阀状态", "HV1042进口阀状态_" + D_HY1042);
            xinxi.put("倒罐阀状态", "HV1043倒罐阀状态_" + D_HY1043);
            xinxi.put("音叉液位状态", "LS1122音叉液位状态_" + D_LS1122);
            xinxi.put("进料阀关状态", "XVT104A进料阀关状态_" + D_XZSC_T104A);
            xinxi.put("进料阀开状态", "XVT104A进料阀开状态_" + D_XZSO_T104A);
            xinxi.put("出料阀关状态", "XVT104B进料阀关状态_" + D_XZSC_T104B);
            xinxi.put("出料阀开状态", "XVT104B进料阀开状态_" + D_XZSO_T104B);
            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T105")) {
            xinxi.put("id", "T105");
            xinxi.put("出口阀状态", "HV1051出口阀状态_" + D_HY1051);
            xinxi.put("进口阀状态", "HV1052进口阀状态_" + D_HY1052);
            xinxi.put("倒罐阀状态", "HV1053倒罐阀状态_" + D_HY1053);
            xinxi.put("音叉液位状态", "LS1112音叉液位状态_" + D_LS1112);
            xinxi.put("进料阀关状态", "XVT105A进料阀关状态_" + D_XZSC_T105A);
            xinxi.put("进料阀开状态", "XVT105A进料阀开状态_" + D_XZSO_T105A);
            xinxi.put("出料阀关状态", "XVT105B进料阀关状态_" + D_XZSC_T105B);
            xinxi.put("出料阀开状态", "XVT105B进料阀开状态_" + D_XZSO_T105B);
            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T106")) {
            xinxi.put("id", "T106");
            xinxi.put("出口阀状态", "HV1061出口阀状态_" + D_HY1061);
            xinxi.put("进口阀状态", "HV1062进口阀状态_" + D_HY1062);
            xinxi.put("倒罐阀状态", "HV1063倒罐阀状态_" + D_HY1063);
            xinxi.put("音叉液位状态", "LS1102音叉液位状态_" + D_LS1102);
            xinxi.put("进料阀关状态", "XVT106A进料阀关状态_" + D_XZSC_T106A);
            xinxi.put("进料阀开状态", "XVT106A进料阀开状态_" + D_XZSO_T106A);
            xinxi.put("出料阀关状态", "XVT106B进料阀关状态_" + D_XZSC_T106B);
            xinxi.put("出料阀开状态", "XVT106B进料阀开状态_" + D_XZSO_T106B);
            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T107")) {
            xinxi.put("id", "T107");
            xinxi.put("出口阀状态", "HV1071出口阀状态_" + D_HV1071);
            xinxi.put("进口阀状态", "HV1072进口阀状态_" + D_HV1072);
            xinxi.put("倒罐阀状态", "HV1073倒罐阀状态_" + D_HV1073);
            xinxi.put("音叉液位状态", "LS1092音叉液位状态_" + D_LS1092);
            xinxi.put("油罐类型", "柴油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T108")) {
            xinxi.put("id", "T108");
            xinxi.put("出口阀状态", "HV1081出口阀状态_" + D_HV1081);
            xinxi.put("进口阀状态", "HV1082进口阀状态_" + D_HV1082);
            xinxi.put("倒罐阀状态", "HV1083倒罐阀状态_" + D_HV1083);
            xinxi.put("音叉液位状态", "LS1082音叉液位状态_" + D_LS1082);
            xinxi.put("油罐类型", "柴油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T109")) {
            xinxi.put("id", "T109");
            xinxi.put("出口阀状态", "HV1091出口阀状态_" + D_HV1091);
            xinxi.put("进口阀状态", "HV1092进口阀状态_" + D_HV1092);
            xinxi.put("倒罐阀状态", "HV1093倒罐阀状态_" + D_HV1093);
            xinxi.put("音叉液位状态", "LS1072音叉液位状态_" + D_LS1072);
            xinxi.put("油罐类型", "柴油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T110")) {
            xinxi.put("id", "T110");
            xinxi.put("出口阀状态", "HV1101出口阀状态_" + D_HV1101);
            xinxi.put("进口阀状态", "HV1102进口阀状态_" + D_HV1102);
            xinxi.put("倒罐阀状态", "HV1103倒罐阀状态_" + D_HV1103);
            xinxi.put("音叉液位状态", "LS1062音叉液位状态_" + D_LS1062);
            xinxi.put("油罐类型", "柴油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T111")) {
            xinxi.put("id", "T111");
            xinxi.put("出口阀状态", "HV1111出口阀状态_" + D_HY1111);
            xinxi.put("进口阀状态", "HV1112进口阀状态_" + D_HY1112);
            xinxi.put("倒罐阀状态", "HV1113倒罐阀状态_" + D_HY1113);
            xinxi.put("音叉液位状态", "LS1052音叉液位状态_" + D_LS1052);
            xinxi.put("进料阀关状态", "XVT111A进料阀关状态_" + D_XZSC_T111A);
            xinxi.put("进料阀开状态", "XVT111A进料阀开状态_" + D_XZSO_T111A);
            xinxi.put("出料阀关状态", "XVT111B进料阀关状态_" + D_XZSC_T111B);
            xinxi.put("出料阀开状态", "XVT111B进料阀开状态_" + D_XZSC_T111B);
            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T112")) {
            xinxi.put("id", "T112");
            xinxi.put("出口阀状态", "HV1121出口阀状态_" + D_HY1121);
            xinxi.put("进口阀状态", "HV1122进口阀状态_" + D_HY1122);
            xinxi.put("倒罐阀状态", "HV1123倒罐阀状态_" + D_HY1123);
            xinxi.put("音叉液位状态", "LS1042音叉液位状态_" + D_LS1042);
            xinxi.put("进料阀关状态", "XVT112A进料阀关状态_" + D_XZSC_T112A);
            xinxi.put("进料阀开状态", "XVT112A进料阀开状态_" + D_XZSO_T112A);
            xinxi.put("出料阀关状态", "XVT112B进料阀关状态_" + D_XZSC_T112B);
            xinxi.put("出料阀开状态", "XVT112B进料阀开状态_" + D_XZSC_T112B);
            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T113")) {
            xinxi.put("id", "T113");
            xinxi.put("出口阀状态", "HV1131出口阀状态_" + D_HY1131);
            xinxi.put("进口阀状态", "HV1132进口阀状态_" + D_HY1132);
            xinxi.put("倒罐阀状态", "HV1133倒罐阀状态_" + D_HY1133);
            xinxi.put("音叉液位状态", "LS1032音叉液位状态_" + D_LS1032);
            xinxi.put("进料阀关状态", "XVT113A进料阀关状态_" + D_XZSC_T113A);
            xinxi.put("进料阀开状态", "XVT113A进料阀开状态_" + D_XZSO_T113A);
            xinxi.put("出料阀关状态", "XVT113B进料阀关状态_" + D_XZSC_T113B);
            xinxi.put("出料阀开状态", "XVT113B进料阀开状态_" + D_XZSC_T113B);
            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T114")) {
            xinxi.put("id", "T114");
            xinxi.put("出口阀状态", "HV1141出口阀状态_" + D_HY1141);
            xinxi.put("进口阀状态", "HV1142进口阀状态_" + D_HY1142);
            xinxi.put("倒罐阀状态", "HV1143倒罐阀状态_" + D_HY1143);
            xinxi.put("音叉液位状态", "LS1022音叉液位状态_" + D_LS1022);
            xinxi.put("进料阀关状态", "XVT114A进料阀关状态_" + D_XZSC_T114A);
            xinxi.put("进料阀开状态", "XVT114A进料阀开状态_" + D_XZSO_T114A);
            xinxi.put("出料阀关状态", "XVT114B进料阀关状态_" + D_XZSC_T114B);
            xinxi.put("出料阀开状态", "XVT114B进料阀开状态_" + D_XZSC_T114B);
            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        } else if (bitNumber.contains("T115")) {
            xinxi.put("id", "T115");
            xinxi.put("出口阀状态", "HV1151出口阀状态_" + D_HY1151);
            xinxi.put("进口阀状态", "HV1152进口阀状态_" + D_HY1152);
            xinxi.put("倒罐阀状态", "HV1153倒罐阀状态_" + D_HY1153);
            xinxi.put("音叉液位状态", "LS1012音叉液位状态_" + D_LS1012);
            xinxi.put("进料阀关状态", "XVT115A进料阀关状态_" + D_XZSC_T115A);
            xinxi.put("进料阀开状态", "XVT115A进料阀开状态_" + D_XZSO_T115A);
            xinxi.put("出料阀关状态", "XVT115B进料阀关状态_" + D_XZSC_T115B);
            xinxi.put("出料阀开状态", "XVT115B进料阀开状态_" + D_XZSC_T115B);
            xinxi.put("油罐类型", "汽油罐");
            Array.add(xinxi);
        }


//        Array.add(xinxi2);
//        Array.add(xinxi3);
        jsonObject.put("array", Array);
        WebSocketTest.sendInfo(jsonObject.toJSONString(), "connect");
//
//        JSONObject jsonObject2 = new JSONObject();
//        JSONObject json2 = new JSONObject();
//        jsonObject2.put("instruction","showpoi");
//        json2.put("showtype","group");
//        json2.put("poigroup","interlocking");
//        json2.put("poitype","interlocking");
//        jsonObject2.put("param",json2);
////        WebSocketTest.sendInfo(jsonObject2.toJSONString(), "connect");
//        for (int i = 0; i < 2; i++) {
//            if (i == 0) {
//                WebSocketTest.sendInfo(jsonObject.toJSONString(), "connect");
//            } else {
//                WebSocketTest.sendInfo(jsonObject2.toJSONString(), "connect");
//            }
//        }
    }
}
